/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.notaria.guerrasalas.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class ServicioTicketPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "FID_TICKET", updatable = false, insertable = false)
    private Long idTicket;
    @Basic(optional = false)
    @Column(name = "FID_SERVICIO", updatable = false, insertable = false)
    private Long idServicio;

    public ServicioTicketPK() {
    }

    public ServicioTicketPK(Long idTicket, Long idServicio) {
        this.idTicket = idTicket;
        this.idServicio = idServicio;
    }

    public Long getIdServicio() {
        return idServicio;
    }

    public void setIdServicio(Long idServicio) {
        this.idServicio = idServicio;
    }

    public Long getIdTicket() {
        return idTicket;
    }

    public void setIdTicket(Long idTicket) {
        this.idTicket = idTicket;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ServicioTicketPK other = (ServicioTicketPK) obj;
        if (this.idTicket != other.idTicket && (this.idTicket == null || !this.idTicket.equals(other.idTicket))) {
            return false;
        }
        if (this.idServicio != other.idServicio && (this.idServicio == null || !this.idServicio.equals(other.idServicio))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 37 * hash + (this.idTicket != null ? this.idTicket.hashCode() : 0);
        hash = 37 * hash + (this.idServicio != null ? this.idServicio.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return idTicket + ";" + idServicio;
    }
}
